home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Message Dialogs / neon-lights.izs < prev    next >
Text File  |  2005-09-28  |  4KB  |  290 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Neon Lights 
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION> Neon lights are an effective way in which to draw attention to signs and banners on the street, and now, to your webpage text as well! 
  7. <!/DESCRIPTION> 
  8.  
  9. <!CATEGORY>Messages<!/CATEGORY>
  10.  
  11. <!SCRIPT>
  12. <!-- START OF SCRIPT -->
  13.  
  14.  
  15. <!-- HOW TO INSTALL NEON LIGHTS:
  16.  
  17.  
  18.  
  19.   1.  Copy code into the body section of document  -->
  20.  
  21.  
  22.  
  23. <!-- STEP ONE: Add this code into BODY section of document  -->
  24.  
  25.  
  26.  
  27. <BODY>
  28.  
  29.  
  30. <!-- Original:  JavaScript Kit -->
  31.  
  32. <!-- Web Site:  http://javascriptkit.com -->
  33.  
  34. <h1>
  35.  
  36. <script language="JavaScript1.2">
  37.  
  38.  
  39.  
  40. var message="Welcome to JavaScriptSource!"
  41.  
  42. var neonbasecolor="gray"
  43.  
  44. var neontextcolor="yellow"
  45.  
  46. var flashspeed=100  //in milliseconds
  47.  
  48.  
  49.  
  50. ///No need to edit below this line/////
  51.  
  52.  
  53.  
  54. var n=0
  55.  
  56. if (document.all||document.getElementById){
  57.  
  58. document.write('<font color="'+neonbasecolor+'">')
  59.  
  60. for (m=0;m<message.length;m++)
  61.  
  62. document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
  63.  
  64. document.write('</font>')
  65.  
  66. }
  67.  
  68. else
  69.  
  70. document.write(message)
  71.  
  72.  
  73.  
  74. function crossref(number){
  75.  
  76. var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)
  77.  
  78. return crossobj
  79.  
  80. }
  81.  
  82.  
  83.  
  84. function neon(){
  85.  
  86.  
  87.  
  88. //Change all letters to base color
  89.  
  90. if (n==0){
  91.  
  92. for (m=0;m<message.length;m++)
  93.  
  94. //eval("document.all.neonlight"+m).style.color=neonbasecolor
  95.  
  96. crossref(m).style.color=neonbasecolor
  97.  
  98. }
  99.  
  100.  
  101.  
  102. //cycle through and change individual letters to neon color
  103.  
  104. crossref(n).style.color=neontextcolor
  105.  
  106.  
  107.  
  108. if (n<message.length-1)
  109.  
  110. n++
  111.  
  112. else{
  113.  
  114. n=0
  115.  
  116. clearInterval(flashing)
  117.  
  118. setTimeout("beginneon()",1500)
  119.  
  120. return
  121.  
  122. }
  123.  
  124. }
  125.  
  126.  
  127.  
  128. function beginneon(){
  129.  
  130. if (document.all||document.getElementById)
  131.  
  132. flashing=setInterval("neon()",flashspeed)
  133.  
  134. }
  135.  
  136. beginneon()
  137.  
  138.  
  139.  
  140.  
  141.  
  142. </script>
  143.  
  144. </h1>
  145.  
  146.  
  147. <!-- END OF SCRIPT -->
  148. <!/SCRIPT>
  149.  
  150. <!PREVIEW>
  151. <!-- START OF SCRIPT -->
  152.  
  153.  
  154.  
  155. <!-- HOW TO INSTALL NEON LIGHTS:
  156.  
  157.  
  158.  
  159.   1.  Copy code into the body section of document  -->
  160.  
  161.  
  162.  
  163. <!-- STEP ONE: Add this code into BODY section of document  -->
  164.  
  165.  
  166.  
  167. <BODY>
  168.  
  169.  
  170. <!-- Original:  JavaScript Kit -->
  171.  
  172. <!-- Web Site:  http://javascriptkit.com -->
  173.  
  174. <h1>
  175.  
  176. <script language="JavaScript1.2">
  177.  
  178.  
  179.  
  180. var message="Welcome to JavaScriptSource!"
  181.  
  182. var neonbasecolor="gray"
  183.  
  184. var neontextcolor="yellow"
  185.  
  186. var flashspeed=100  //in milliseconds
  187.  
  188.  
  189.  
  190. ///No need to edit below this line/////
  191.  
  192.  
  193.  
  194. var n=0
  195.  
  196. if (document.all||document.getElementById){
  197.  
  198. document.write('<font color="'+neonbasecolor+'">')
  199.  
  200. for (m=0;m<message.length;m++)
  201.  
  202. document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
  203.  
  204. document.write('</font>')
  205.  
  206. }
  207.  
  208. else
  209.  
  210. document.write(message)
  211.  
  212.  
  213.  
  214. function crossref(number){
  215.  
  216. var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)
  217.  
  218. return crossobj
  219.  
  220. }
  221.  
  222.  
  223.  
  224. function neon(){
  225.  
  226.  
  227.  
  228. //Change all letters to base color
  229.  
  230. if (n==0){
  231.  
  232. for (m=0;m<message.length;m++)
  233.  
  234. //eval("document.all.neonlight"+m).style.color=neonbasecolor
  235.  
  236. crossref(m).style.color=neonbasecolor
  237.  
  238. }
  239.  
  240.  
  241.  
  242. //cycle through and change individual letters to neon color
  243.  
  244. crossref(n).style.color=neontextcolor
  245.  
  246.  
  247.  
  248. if (n<message.length-1)
  249.  
  250. n++
  251.  
  252. else{
  253.  
  254. n=0
  255.  
  256. clearInterval(flashing)
  257.  
  258. setTimeout("beginneon()",1500)
  259.  
  260. return
  261.  
  262. }
  263.  
  264. }
  265.  
  266.  
  267.  
  268. function beginneon(){
  269.  
  270. if (document.all||document.getElementById)
  271.  
  272. flashing=setInterval("neon()",flashspeed)
  273.  
  274. }
  275.  
  276. beginneon()
  277.  
  278.  
  279.  
  280.  
  281.  
  282. </script>
  283.  
  284. </h1>
  285.  
  286. <!-- END OF SCRIPT -->
  287. <!/PREVIEW>
  288.  
  289. <!RELATED>NONE<!/RELATED>
  290.